<script type="text/javascript">

function chang_bg(string){
	
	id1 = string+"1";
	id2 = string+"2";
	id3 = string+"3";
    document.getElementById(id1).className="left_cuv";
	document.getElementById(id2).className="mid_cuv";
	document.getElementById(id3).className="right_cuv";
	
}
function chang_bk(string){
	id1 = string+"1";
	id2 = string+"2";
	id3 = string+"3";
	document.getElementById(id1).className="aaa";
	document.getElementById(id2).className="bbb";
	document.getElementById(id3).className="ccc";
}

</script>
<?php 
	$CI = &get_instance();
	$name_url = $CI->uri->segment(1);
	
	$intro_left 	= "";
	$intro_mid 		= "";
	$intro_right 	= "";
	$url_intro 		= "";
	
	$contact_left 	= "";
	$contact_mid 		= "";
	$contact_right 	= "";
	$url_contact 		= "";
	
	$home_left 	= "";
	$home_mid 		= "";
	$home_right 	= "";
	$url_home 		= "";
	

	if($name_url == "introduce")
	{
		$intro_left  = "left_cuv";
		$intro_mid   = "mid_cuv";
		$intro_right = "right_cuv";
		$url_home = 'onmousemove="chang_bg(this.id)" onmouseout="chang_bk(this.id)"';
		$url_contact = 'onmousemove="chang_bg(this.id)" onmouseout="chang_bk(this.id)"';
	}
	else if($name_url == "contact")
	{
		$contact_left  = "left_cuv";
		$contact_mid   = "mid_cuv";
		$contact_right = "right_cuv";
		$url_home = 'onmousemove="chang_bg(this.id)" onmouseout="chang_bk(this.id)"';
		$url_intro= 'onmousemove="chang_bg(this.id)" onmouseout="chang_bk(this.id)"';
	}
	else
	{
		$home_left  = "left_cuv";
		$home_mid   = "mid_cuv";
		$home_right = "right_cuv";
		$url_intro = 'onmousemove="chang_bg(this.id)" onmouseout="chang_bk(this.id)"';
		$url_contact = 'onmousemove="chang_bg(this.id)" onmouseout="chang_bk(this.id)"';
	}
	
?>
<ul id="menu">

    <?php if(empty($_SESSION['lang'])){?>
    	<li class="language"><a   href="<?php echo base_url()?>index.php/home/lg/vn"><img src="<?php echo base_url()?>public/images/home/flag_vie.gif"/></a></li>
        <?php } else {?>
    	<li class="language"><a href="<?php echo base_url()?>index.php/home/lg/en"><img src="<?php echo base_url()?>public/images/home/flag_eng.gif"/></a></li>
        <?php }?>
        <li>
        <!-- Change if(1==1) into action of this link, Example if($act=='home') -->
        	<a id="home" href="<?php echo base_url()?>" <?php echo $url_home?> >
	        	<div id="home1" class="<?php echo $home_left?>"></div>
	            <div id="home2" class="<?php echo $home_mid?>"><?php if(empty($_SESSION['lang'])) echo "Home" ;else echo "Trang chủ"; ?></div>
	            <div id="home3" class="<?php echo $home_right?>"></div>
        	</a>
        </li>
        <li>
        <!-- Change if(1==1) into action of this link , Example if($act=='introduce') -->
        	<a  id="intro" <?php echo $url_intro?>  href="<?php echo base_url()?>index.php/introduce">
        		<div id="intro1" class="<?php echo $intro_left?>"></div>
	            <div id="intro2" class="<?php echo $intro_mid?>"><?php if(empty($_SESSION['lang'])) echo "Aboud us" ;else echo "Giới thiệu"?> </div>
	            <div id="intro3" class="<?php echo $intro_right?>"></div>
        	</a>
        </li>
        <li>
        <!-- Change if(1==1) into action of this link , Example if($act=='contact') -->
        	<a id="contact" <?php echo $url_contact?>  href="<?php echo base_url()?>index.php/contact">
        		<div id="contact1" class="<?php echo $contact_left?>"></div>
	            <div  id="contact2" class="<?php echo $contact_mid?>"><?php if(empty($_SESSION['lang'])) echo "Contact to rent/ Consign" ; else echo "Liên hệ cho thuê / ký gửi"; ?> </div>
	            <div id="contact3"  class="<?php echo $contact_right?>"></div>
        	</a>
        </li>
    </ul><!--end menu-->